// 赢牌-碰
class TanpaiOther extends eui.Component {
  public pokerValue: eui.Image
  public tileData: tileData
  public SeatType: number
  public bg1: eui.Image

  public constructor(SeatType) {
    super()
    this.once(eui.UIEvent.COMPLETE, this.onComplete, this)
    switch (SeatType) {
      case 1:
        this.skinName = `<e:Skin class="TanpaiPoker1" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
          <e:Image source="winPokerUp_2_png" y="0" x="0" width="48" height="38"/>
          <e:Image id="bg1" visible="false" source="winPoker_2_png" y="0" x="0" width="48" height="38"/>
	        <e:Image id="pokerValue" x="0.61" y="25.62" scaleY="0.45" scaleX="0.35" rotation="-90" smoothing="true" width="75" source="XS_1_png"/>
        </e:Skin>`
        break
      case 2:
        this.skinName = `<e:Skin class="TanpaiPoker2" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
          <e:Image x="0" y="0" source="winPokerUp_3_png" scaleX="0.8" scaleY="0.8" width="45" height="65"/>
          <e:Image id="bg1" visible="false" x="0" y="0" source="winPoker_3_png" scaleX="0.8" scaleY="0.8" width="45" height="65"/>
	        <e:Image id="pokerValue" x="35" y="40" width="60" height="66" rotation="-180" smoothing="true" scaleX="0.6" scaleY="0.6" source="XS_1_png"/>
        </e:Skin>`
        break
      case 3:
        this.skinName = `<e:Skin class="TanpaiPoker3" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
          <e:Image source="winPokerUp_2_png" y="0" width="42" height="37"/>
          <e:Image id="bg1" visible="false" source="winPoker_2_png" y="0" width="42" height="37"/>
	        <e:Image id="pokerValue" width="50" height="65" x="40" y="-0.19999999999999996" scaleY="0.6" scaleX="0.6" rotation="90" smoothing="true" anchorOffsetY="0" anchorOffsetX="0" source="XS_1_png"/>
        </e:Skin>`
        break
    }
  }
  protected onComplete() {
    this.touchChildren = false
    this.name = 'tanpaiOther'
  }
  public setContent(_skinName: string) {
    this.pokerValue.source = _skinName
  }
  public setData(tileData: tileData) {
    this.tileData = tileData
    this.setContent(tileData.suitType + "_" + tileData.count + "_png")
    this.bg1.visible = false
    this.pokerValue.visible = true
  }
  public setBack() {
    this.bg1.visible = true
    this.pokerValue.visible = false
  }
}